<% if (user) { %>
<% if (user.identity) { %>
<div class="nav-setting">
    <div class="ui buttons">
        <div class="ui floating dropdown button">
            <i class="icon bars"></i>
            <div class="menu">
                <a class="item" href="/posts?author=<%= user._id %>">个人主页</a>
                <div class="divider"></div>
                <a class="item" href="/gallary">成长相册</a>
                <% if ('教师' == user.identity || '管理员' == user.identity) { %>
                <a class="item" href="/posts/create">图文上传</a>
                <a class="item" href="/admin/inputStudent">学生录入</a>
                <% } %>
                <a class="item" href="/signout">登出</a>
                <% } %>
            </div>
        </div>
    </div>
</div>
<% } else { %>
<div class="nav-setting">
    <div class="ui buttons">
        <div class="ui floating dropdown button">
            <i class="icon bars"></i>
            <div class="menu">
                <a class="item" href="/signin">登录</a>
                <a class="item" href="/signup">注册</a>
            </div>
        </div>
    </div>
</div>
<% } %>
